namespace Radar.Test
{
    using NUnit.Framework;

    [TestFixture]
    public class TransientLifetimeTest
    {
        private Lifetime lifetime;

        [SetUp]
        public void SetUp()
        {
            lifetime = new TransientLifetime();
        }

        [Test]
        public void WillReturnDifferentObjects()
        {
            var builder = lifetime.GetBuilder(c => new object());

            var context = new ResolveContext();

            var o1 = builder(context);
            var o2 = builder(context);

            Assert.That(o1, Is.Not.Null);
            Assert.That(o2, Is.Not.Null);
            Assert.That(o1, Is.Not.EqualTo(o2));
        }
    }
}